Những câu hỏi liên quan
Chí Nguyễn
Xem chi tiết
Bùi Anh Tuấn
14 tháng 3 2021 lúc 20:59

Bình luận (1)
Minh Lệ
15 tháng 3 2021 lúc 18:55

Program HOC24;

const fi='INPUTC2.TXT'

var s: longint;

a,b: integer;

f: text;

procedure ip;

begin 

assign(f,fi);

reset(f);

read(f,a,b);

s:=a*b;

close(f);

end;

begin

ip;

write('S= ',s);

readln

end.

Bình luận (0)
Huyennnn
Xem chi tiết
nguyen đức mạnh
29 tháng 8 2023 lúc 21:12

program TinhDienTichHinhTron;
var
  fIn, fOut: Text;
  r: Integer;
  dien_tich: Real;
begin
  Assign(fIn, 'dt_ht.inp');
  Reset(fIn);
  Readln(fIn, r);
  Close(fIn);

  Assign(fOut, 'dt_ht.out');
  Rewrite(fOut);

  dien_tich := Pi * r * r;

  Writeln(fOut, FormatFloat('0.00', dien_tich));

  Close(fOut);
end.

Bình luận (0)
Thương Thương
Xem chi tiết
Đoàn Xuân Sơn
10 tháng 3 2022 lúc 1:04

const fi='nhap.txt'

uses crt;

var

f:text;

b:byte;

a:longint;

begin

clrscr;

assign(f,f1);

reset(f);

read(f,a,b);

close(f);

a:=exp(b*ln(a));

write('ket qua la: ',a);

readln;

end.

Bình luận (0)
Nguyên lê
Xem chi tiết
Hiếu Đinh
Xem chi tiết
Nguyễn Lê Phước Thịnh
24 tháng 2 2022 lúc 13:38

#include <bits/stdc++.h>

using namespace std;

string st;

int d,i;

int main()

{

freopen("chu_so.txt", "r",stdin);

getline(cin,st);

d=st.length();

for (i=0; i<=d; i++) 

if (48<=st[i] && st[i]<=57) cout<<st[i]<<" ";

return 0;

}

Bình luận (0)
Quyen Duong
Xem chi tiết
Minh Lệ
7 tháng 3 2023 lúc 21:56

Program HOC24;

var r,s: real;

begin

write('Nhap ban kinh: '); readln(r);

writeln('Dien tich la: ',r*r*3.14:6:2);

write('Chu vi la: ',r*2*3.14:6:2);

readln

end.

Bình luận (0)
Minh Lệ
Xem chi tiết
Anh Lê Quốc Trần
6 tháng 8 2023 lúc 21:28

C:=3.14*2*R;

S:=3.14*R*R;

Bình luận (0)
Đinh Hoàng Nhất Quyên
Xem chi tiết
Phía sau một cô gái
10 tháng 8 2023 lúc 8:47

#include <iostream>

#include <iomanip>

int main() {

     int r;

     std::cin >> r;

     double pi = 3.14;

     double perimeter = 2 * pi * r;

     double area = pi * r * r;

     std::cout << std::fixed << std::setprecision(2);

     std::cout << "p= " << perimeter << std::endl;

     std::cout << "s= " << area << std::endl;

     return 0;

}

Bình luận (0)
nguyen đức mạnh
29 tháng 8 2023 lúc 21:11

#include <iostream>
#include <iomanip>
using namespace std;

int main() {
    int r;
    const float Pi = 3.14;

    cout << "Nhap ban kinh hinh tron: ";
    cin >> r;

    float chu_vi = 2 * Pi * r;
    float dien_tich = Pi * r * r;

    cout << fixed << setprecision(2);
    cout << "p= " << chu_vi << endl;
    cout << "s= " << dien_tich << endl;

    return 0;
}

Bình luận (0)
Hồ Nguyên
Xem chi tiết